#!/usr/bin/env python 
# -*- coding:utf-8 -*-

import mysql.connector
db_connect = mysql.connector.connect(
    host='8.142.105.62',
    user='root',
    passwd='123456',
    database='test',
    charset='utf8'
)
db = db_connect.cursor()

sql = "delete from user where id in (10,11,12)"

db.execute(sql)
db_connect.commit()

print("删除的数据条数",db.rowcount)